using Engine;
using Engine.OldSerialization;

namespace RuthlessConquest {
    public struct Order {
        public class Serializer : ISerializer<Order> {
            public void Serialize(InputArchive archive, ref Order value) {
                archive.Serialize("ShipsCount", ref value.ShipsCount);
                archive.Serialize("PlanetIndex", ref value.PlanetIndex);
                archive.Serialize("RouteIndexes", ref value.RouteIndexes);
                archive.Serialize("GiftToFaction", ref value.GiftToFaction);
                archive.Serialize("LaunchSatellite", ref value.LaunchSatellite);
                archive.Serialize("EnableDisableSatellites", ref value.EnableDisableSatellites);
            }

            public void Serialize(OutputArchive archive, Order value) {
                archive.Serialize("ShipsCount", value.ShipsCount);
                archive.Serialize("PlanetIndex", value.PlanetIndex);
                archive.Serialize("RouteIndexes", value.RouteIndexes);
                archive.Serialize("GiftToFaction", value.GiftToFaction);
                archive.Serialize("LaunchSatellite", value.LaunchSatellite);
                archive.Serialize("EnableDisableSatellites", value.EnableDisableSatellites);
            }
        }

        public int ShipsCount;

        public int PlanetIndex;

        public DynamicArray<int> RouteIndexes;

        public Faction GiftToFaction;

        public bool LaunchSatellite;

        public bool? EnableDisableSatellites;
    }
}